<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/assets/lib/cropper/cropper.css">
    <link rel="stylesheet" href="/assets/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/assets/css/articel/art_pub.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">写文章</div>
        <div class="layui-card-body">
            <form class="layui-form" action="">
                <!-- 文章标题 -->
                <div class="layui-form-item">
                    <label class="layui-form-label">文章标题</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" required lay-verify="required" placeholder="请输入文章标题"
                            autocomplete="off" class="layui-input">
                    </div>
                </div>
                <!-- 文章类别 -->
                <div class="layui-form-item">
                    <label class="layui-form-label">文章类别</label>
                    <div class="layui-input-block">
                        <select name="cate_id" lay-verify="required">
                            <option value="">请选择文章类别</option>
                            <option value="0">北京</option>
                            <option value="1">上海</option>

                        </select>
                    </div>
                </div>

                <!-- 文章内容 -->
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">文章内容</label>
                    <div class="layui-input-block" style="height:400px;">
                        <textarea name="content" placeholder="请输入内容" class="layui-textarea"></textarea>
                    </div>
                </div>

                <!-- 文章封面 -->
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">文章文章封面</label>
                    <div class="layui-input-block" style="height:400px;">
                        <div class="img_area">
                            <!-- 第一行的图片裁剪和预览区域 -->

                            <div class="row1">
                                <!-- 图片裁剪区域 -->
                                <div class="cropper-box">
                                    <!-- 这个 img 标签很重要，将来会把它初始化为裁剪区域 -->
                                    <img id="image" src="/assets/images/sample.jpg" />
                                </div>
                                <!-- 图片的预览区域 -->
                                <div class="preview-box">
                                    <div>
                                        <!-- 宽高为 100px 的预览区域 -->
                                        <div class="img-preview w100"></div>

                                    </div>

                                </div>
                            </div>

                            <!-- 第二行的按钮区域 -->
                            <div class="row2">
                                <button type="button" class="layui-btn layui-btn-danger" id="chooseImgBtn">确定上传</button>
                                <input type="file" name="" id="chooseImgInp">
                            </div>
                        </div>

                    </div>
                </div>

                <!-- 按钮 -->
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button id="btn1" class="layui-btn" lay-submit lay-filter="formDemo">发布</button>
                        <button id="btn2" class="layui-btn layui-btn-primary" lay-submit>存为草稿</button>
                    </div>
                </div>
            </form>

        </div>
    </div>

    <script src="/assets/lib/tinymce/tinymce.min.js"></script>
    <script src="/assets/lib/tinymce/tinymce_setup.js"></script>
    <script src="/assets/lib/layui/layui.all.js"></script>
    <script src="/assets/lib/axios.js"></script>
    <script src="/assets/js/common.js"></script>
    <script src="/assets/lib/jquery.js"></script>
    <script src="/assets/lib/cropper/Cropper.js"></script>
    <script src="/assets/lib/cropper/jquery-cropper.js"></script>

    <script src="/assets/js/articel/art_pun.js"></script>
</body>

</html>